package com.yun.image.yunimagebackend.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yun.image.yunimagebackend.model.entity.User;
import com.yun.image.yunimagebackend.model.vo.user.LoginUserVo;

import javax.servlet.http.HttpServletRequest;

/**
* @author songqiang
* @description 针对表【user(用户)】的数据库操作Service
* @createDate 2025-02-05 14:21:46
*/
public interface UserService extends IService<User> {

    Long userRegister(String userAccount, String userPassword, String checkPassword);

    /**
     * 加密
     * @param password
     * @return
     */
    String getEncryptPassword(String password);
    /**
     * 解密
     */
    String getDecryptPassword(String password);

    /**
     * 用户登录
     * @param userAccount
     * @param userPassword
     * @return
     */
    LoginUserVo userLogin(String userAccount, String userPassword, HttpServletRequest request);

    /**
     * 获取当前登录用户
     */
    User getLoginUser(HttpServletRequest request);

    /**
     * 用户注销
     * @param request 请求
     * @return
     */
    void userLogout(HttpServletRequest request);
}
